// src/styles/mixin.scss

// rem 基准值
$baseFontSize: 16;

// px 转 rem
@function toRem($px) {
  @return ($px / $baseFontSize) + rem;
}

// px 转 rem mixin
@mixin toRem($property, $values) {
  $max: length($values);
  $remValues: '';

  @for $i from 1 through $max {
    $value: nth($values, $i);
    $remValues: #{$remValues + toRem($value)};

    @if $i < $max {
      $remValues: #{$remValues + " "};
    }
  }

  #{$property}: $remValues;
}